<template>
  <div class="no-permission-container">
    <div class="content">
      <img src="../assets/no-permission.png" alt="无权限" class="no-permission-image" />
      <h1>抱歉，您没有权限访问此页面</h1>
      <p>请确保您有足够的权限或联系管理员获取帮助。</p>
      <a-button type="primary" @click="goToHome">返回主页</a-button>
    </div>
  </div>
</template>

<script lang="ts" setup>
import { useRouter } from 'vue-router'

const router = useRouter()

const goToHome = () => {
  router.replace('/')
}
</script>

<style scoped>
.no-permission-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color: #f5f5f5;
}

.content {
  text-align: center;
  background-color: white;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.no-permission-image {
  width: 200px;
  height: 200px;
  margin-bottom: 20px;
}

h1 {
  font-size: 24px;
  color: #333;
  margin-bottom: 10px;
}

p {
  font-size: 16px;
  color: #666;
  margin-bottom: 20px;
}

a-button {
  padding: 10px 20px;
  font-size: 16px;
}
</style>
